import request from "@/utils/request";

// 查询事件配置接口
export const selectSynergyEventConfig = (data) => {
  return request({
    url: "/support/synergyEvent/selectSynergyEventConfig",
    method: "post",
    data: data,
  });
};

// 新增事件配置
export const addSynergyEventConfig = (data) => {
  return request({
    url: "/support/synergyEvent/addSynergyEventConfig",
    method: "post",
    data: data,
  });
};

// 删除事件配置
export const delSynergyEventConfig = (data) => {
  return request({
    url: "/support/synergyEvent/delSynergyEventConfig",
    method: "post",
    params: data,
  });
};

// 修改事件类型配置状态
export const updateEventConfigState = (data) => {
  return request({
    url: "/support/synergyEvent/updateEventConfigState",
    method: "post",
    params: data,
  });
};

// 查询租户（系统）
export const getSystemCode = (data) => {
  return request({
    url: "/support/lessee/list",
    method: "get",
    params: data,
  });
};

// 通过配置code查询配置详情
export const getDetailByEventCode = (data) => {
  return request({
    url: "/support/synergyEvent/selectSynergyEventConfigByEventCode",
    method: "get",
    params: data,
  });
};

// 查询字段配置接口
export const selectSynergyRefFiledConfigPage = (data) => {
  return request({
    url: "/support/synergyRefFiledConfig/selectSynergyRefFiledConfigPage",
    method: "get",
    params: data,
  });
};

// 新增或修改字段关联配置
export const addOrUpdateSynergyRefFiledConfig = (data) => {
  return request({
    url: "/support/synergyRefFiledConfig/addOrUpdateSynergyRefFiledConfig",
    method: "post",
    data: data,
  });
};

// 查询字段关联配置详情接口
export const getFiledConfigDetail = (data) => {
  return request({
    url: "/support/synergyRefFiledConfig/getFiledConfigDetail",
    method: "get",
    params: data,
  });
};

// 删除字段配置
export const deleteSynergyRefFiledConfig = (data) => {
  return request({
    url: "/support/synergyRefFiledConfig/deleteSynergyRefFiledConfig",
    method: "post",
    params: data,
  });
};

// 修改字段配置状态
export const updateRefFiledConfigState = (data) => {
  return request({
    url: "/support/synergyRefFiledConfig/updateRefFiledConfigState",
    method: "post",
    params: data,
  });
};

// 新增时查询表单内字段关联列表
export const getFiledEvent = (data) => {
  return request({
    url: "/support/synergyRefFiledConfig/getFiledEvent",
    method: "get",
    params: data,
  });
};

// 查询事件类型下拉列表
export const selectSynergyEventConfigLists = (data) => {
  return request({
    url: "/support/synergyEvent/selectSynergyEventConfigLists",
    method: "get",
    params: data,
  });
};

// 查询关联工单下拉列表
export const getFiledRefOrder = (data) => {
  return request({
    url: "/support/synergyRefFiledConfig/getFiledRefOrder",
    method: "get",
    params: data,
  });
};

// 查询事件列表
export const selectSynergyEventLists = (data) => {
  return request({
    url: "/support/synergyEvent/selectSynergyEventLists",
    method: "get",
    params: data,
  });
};

// 查询事件详情
export const selectEventDetails = (data) => {
  return request({
    url: "/support/synergyEvent/selectEventDetails",
    method: "get",
    params: data,
  });
};

// 查询来源类型
export const selectSynergySourceLists = (data) => {
  return request({
    url: "/support/synergyEvent/selectSynergySourceLists",
    method: "get",
    params: data,
  });
};
